package controller.action;

import model.service.MAdminService;

import com.opensymphony.xwork2.ActionSupport;

public class mobileAdmin extends ActionSupport{
	private String result;
	private MAdminService mAdminService;
	private int pageNum;
	private String adminInfo;
	public void setPageNum(int pageNum) {
		this.pageNum = pageNum;
	}
	public String getResult() {
		return result;
	}
	public void setmAdminService(MAdminService mAdminService) {
		this.mAdminService = mAdminService;
	}
	
	
	public void setAdminInfo(String adminInfo) {
		this.adminInfo = adminInfo;
	}
	public String mAdminAllocate(){
		result = mAdminService.allocateAll();
		return SUCCESS;
	}
	public String getList()
	{
		result= mAdminService.getList(pageNum);
		return SUCCESS;
	}
	public String add()
	{
		System.out.println(adminInfo);
		result = mAdminService.add(adminInfo);
		return SUCCESS;
	}
	public String modify()
	{
		result = mAdminService.modify(adminInfo);
		return SUCCESS;
	}
	public String delete()
	{
		result = mAdminService.deleteAll(adminInfo);
		return SUCCESS;
	}
	public String query()
	{
		result = mAdminService.queryByEpname(adminInfo);
		return SUCCESS;
	}

}
